package com.ruoyi.system.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 优惠券对象 coupons
 * 
 * @author ruoyi
 * @date 2024-09-24
 */
public class Coupons extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 优惠券ID */
    private Long couponId;

    /** 优惠券码 */
    @Excel(name = "优惠券码")
    private String code;

    /** 折扣金额或百分比 */
    @Excel(name = "折扣金额或百分比")
    private BigDecimal discountType;

    /** 有效期起始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "有效期起始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date validFrom;

    /** 有效期结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "有效期结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date validTo;

    /** 优惠券状态(有效 已使用 已过期) */
    @Excel(name = "优惠券状态(有效 已使用 已过期)")
    private String status;

    public void setCouponId(Long couponId) 
    {
        this.couponId = couponId;
    }

    public Long getCouponId() 
    {
        return couponId;
    }
    public void setCode(String code) 
    {
        this.code = code;
    }

    public String getCode() 
    {
        return code;
    }
    public void setDiscountType(BigDecimal discountType) 
    {
        this.discountType = discountType;
    }

    public BigDecimal getDiscountType() 
    {
        return discountType;
    }
    public void setValidFrom(Date validFrom) 
    {
        this.validFrom = validFrom;
    }

    public Date getValidFrom() 
    {
        return validFrom;
    }
    public void setValidTo(Date validTo) 
    {
        this.validTo = validTo;
    }

    public Date getValidTo() 
    {
        return validTo;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("couponId", getCouponId())
            .append("code", getCode())
            .append("discountType", getDiscountType())
            .append("validFrom", getValidFrom())
            .append("validTo", getValidTo())
            .append("status", getStatus())
            .toString();
    }
}
